
<script type="text/javascript" src="../../assets/javascripts/checkRegisterForm.js"></script>




<%= form_for(:user, :url => {:action => 'login'}, :html => { :onsubmit => 'return checkLoginForm ();' }) do |f| %>
	<div class="form_box">
		<div class="field_name">Username
		<%= f.text_field :name, :class => 'text_box', :id=> "username" %></div>

		<div class="field_name">Password
		<%= f.password_field :password, :class => 'text_box', :id=> "password" %></div>
		
		
		<div>
			<div class="pad_top"></div>
			<%= link_to("Forgotten password?", {:controller => :users, :action => :forgot_password}, :class=>'direct_to') %>
			<%= submit_tag "Login", :class=>'submit_button' %>
		</div>

		<div class="lower">
			<div id="loginFail" style="margin-left: 10px; color: black;"></div>
			<%= link_to("Create new account", {:controller => :users, :action => :signup}, :class => 'direct_lower') %>
		</div>
		
	</div>

<% end %>

<% if flash[:notice] == "fail"%>
	<script type="text/javascript">loginFail ();</script>
<% end %>